<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>

    /**
     * js中的常用的对象
     *
     *
    + new Array()                                                   创建空数组
    + new Array(5)                                                 创建数组时给定长度
    + new Array(ele1,ele2,ele3,... ... ,elen);          创建数组时指定元素值
    + [ele1,ele2,ele3,... ... ,elen];                           相当于第三种语法的简写
     */
    var array1 = new Array();
    console.log(array1)
    var array2 = new Array(5);
    console.log(array2)
    var array3 = [1, 2, 3, 4, 5];
    console.log(array3)

    //boolean对象
    var boolean = new Boolean(true);
    console.log(boolean)
    var s = boolean.toString();
    console.log(s)
    console.log(typeof s)
    var object = boolean.valueOf();
    console.log(object)
    console.log(typeof object)

    //Date对象
    var date = new Date();
    console.log(date)

    //随机数
    var random =Math.random() * 10;
    console.log(random)

</script>
</body>
</html>